package PTA.javajibenyufa;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Scanner;
/*
enum Grade{//枚举的类型需要定义在类之外
    A("Excellent"),B("Good"),C("Average"),D("Fair"),E("Poor");

    public  String desc;

    Grade(String desc) {
        this.desc = desc;
    }

    public String getDesc(){
        return desc;
    }
}

public class ex06 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int score=sc.nextInt();
            Grade a=getGrade(score);
            System.out.println(a.getDesc());
            printGradeInfo(a);
        }
    }

    public static Grade getGrade(int score){
        Grade ret;
        switch (score/10){
            case 10:
            case 9:
                ret=Grade.A;
                break;
            case 8:
                ret=Grade.B;
                break;
            case 7:
                ret=Grade.C;
                break;
            case 6:
                ret=Grade.D;
                break;
            default:
                ret=Grade.E;
                break;
        }
        return ret;
    }

    public static void printGradeInfo(Grade grade){
        System.out.println("class name="+Grade.class);
        System.out.println("grade value="+grade);
    }
}*/

/*
enum Grade{
    A("Excellent"),B("Good"),C("Average"),D("Fair"),E("Poor");
    private String so;
    private Grade(String so){
    this.so = so;
}
public String getSo(){
    return so;
}

}
public class ex06{
    public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
while(sc.hasNext()){
int score = sc.nextInt();
Grade a= getGrade(score);
    System.out.println(a.getSo());
    printGradeInfo(a);
    }
}

    private static Grade getGrade(int score) {
Grade result;
switch(score){
    case 100:
    case 90:
        result = Grade.A;
        break;
    case 80:
        result = Grade.B;
        break;
    case 70:
        result = Grade.C;
        break;
    case 60:
        result = Grade.D;
        break;
    default:
        result = Grade.E;
        break;
}
return result;

    }
    public static void printGradeInfo(Grade grade){
        System.out.println("class name="+Grade.class);
        System.out.println("grade value="+grade);
    }

}*/

enum Grade{
    A,B,C,D,E;
}
public class ex06{
    public static Grade getGrade(int s){
        if(s>=90&&s<=100){
            return Grade.A;
        }else if(s>=80&&s<90){
            return Grade.B;
        }else if(s>=70&&s<80){
            return Grade.C;
        }else if(s>=60&&s<70){
            return Grade.D;
        }else {
            return Grade.E;
        }
    }
    public static void printGradeInfo(Grade grade){
        System.out.println("class name="+Grade.class);
        System.out.println("grade value="+grade);
    }
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        int a=0;
        while(true){

     a= sc.nextInt();
            switch (getGrade(a)){
                case A:
                    System.out.println("Excellent");
                    printGradeInfo(Grade.A);
                    break;
                case B:
                    System.out.println("Good");
                    printGradeInfo(Grade.B);
                    break;
                case C:
                    System.out.println("Average");
                    printGradeInfo(Grade.C);
                    break;
                case D:
                    System.out.println("Fair");
                    printGradeInfo(Grade.D);
                    break;
                default:
                    System.out.println("Poor");
                    printGradeInfo(Grade.E);
                    break;
            }
        }
    }



}